//
//  Then.swift
//  pBox
//
//  Created by TianChenIMac1 on 2019/11/19.
//  Copyright © 2019 skymesh. All rights reserved.
//

import Foundation
import UIKit
public protocol Then {}

extension Then where Self : Any {
    
}

extension Then where Self : AnyObject {
    public func then(_ block: (Self) throws -> Void) rethrows -> Self {
        try block(self)
        return self
    }
}

extension NSObject: Then {}
extension CGPoint: Then {}
extension CGRect: Then {}
extension CGSize: Then {}
extension CGVector: Then {}
extension Array: Then {}
extension Dictionary: Then {}
extension Set: Then {}

#if os(iOS) || os(tvOS)
extension UIEdgeInsets: Then {}
extension UIOffset: Then {}
extension UIRectEdge: Then {}
#endif
